home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.9 KB | 92 lines | [TEXT/GEOL] |
- Item 5189459 7-Aug-90 06:09PDT
-
- From: SAVITAR Savitar, Rudy Burger,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: hiding TGridView columns
-
- Attn: MacApp.Tech$
- SentBy: James Plamondon
- Date 8/7/90
- Subject hiding TGridView columns
- From James Plamondon
- To MacApp.Tech$
-
- From MIKEAPPLELINK hiding TGridView columns
- Item 4657685 6-Aug-90 18:06PDT
-
- From: SAVITAR Savitar, Rudy Burger,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: hiding TGridView columns
-
- Attn: MacApp.Tech$
- SentBy: James Plamondon
- Date 8/6/90
- Subject hiding TGridView columns
- From James Plamondon
- To MacApp.Tech$
-
- From MIKEAPPLELINK hiding TGridView columns
- Item 4190555 6-Aug-90 13:58PDT
-
- From: POWERUP.ENG Power Up Software,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: hiding TGridView columns
-
- Attn: MacApp.Tech$
- SentBy: James Plamondon
- Date 8/6/90
- Subject hiding TGridView columns
- From James Plamondon
- To MacApp.Tech$
-
- Subject: hiding TGridView columns
- Gentlepersons,
-
- I need to be able to show and hide columns in a grid view. When hidden
- columns are shown, they need to return to the width they had when previously
- shown. An obvious way to do this is to negate the widths of hidden columns,
- so that a column of width 35, when hidden, would have a width of -35. It
- would be necessary to use a width of zero instead of -35 in a number of places
- — specifically, for anything having to do with drawing.
-
- The widths of columns in a grid view are maintained in a TRunArray, referenced
- by TGridView.fColWidths. I'm thinking about subclassing TRunArray to provide
- the functionality I need. I would need to override the following TRunArray
- routines:
- GetValue(): to return zero instead of the actual negative value
- SumValues(): to only add positive values
- FindChunk(): it looks complicated, it's called by SumValues(), so I'll
- probably have to change it, too.
-
- I'll also have to free the TRunArray allocated and assigned to fColWidths in
- the initialization of the TGridView, and create a new one of the new type in
- its place.
-
- So, my question for the gang is: Does anybody see any reason why this will
- scheme will not work? Perhaps someone has got such a mechanism working
- already — if so, I'd love to share your code, or trade you for some of my
- stuff.
-
- Looking forward to implementing this feature without having to work too hard,
- I remain
-
- Yours,
-
- James Plamondon
-
- P.S.: This would be more convenient if fColWidths' TRunArray were created
- by a CreateColWidths() method, which it is not. Perhaps that is true of all
- owned objects: that they should be created by Create<FieldName> routines, so
- that the class of the created object can be easily overridden.
-
- jp
-
-
-
-